#ifndef EGG_BLITSTAGE_H
#define EGG_BLITSTAGE_H

#include "Shader.h"
#include "Texture.h"
#include "Geometry.h"
#include "StateCache.h"
#include "ShaderLib.h"
#include "GeometryLib.h"
#include "ShaderParamMap.h"
#include "FrameEvent.h"

namespace egg{

    class BlitStage{
    public:
        BlitStage();

        inline void doBlit(const FrameEvent& evt,TexturePtr tex){
            mColor->mTexture=tex;
            mParamMap._commitParamsForce();
            mQuad->draw();
        }
    protected:
        uint32 mColorSlot;
        ShaderPtr mShader;
        GeometryPtr mQuad;
        TextureParamPtr mColor;
        ShaderParamMap mParamMap;
    };

}

#endif